// import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import {myPlugin} from '../src/plugin/myPlugin'
// 动态设置根字体 插件 配合pxtorem
import 'amfe-flexible'

const app = createApp(App)

app.use(createPinia())
app.use(router)
// 定义插件
app.use(myPlugin, { message: 'Hello, world1!' })

// 注册全局自定义指令 组件内使用v-focused 
app.directive('focused', {
        mounted(el: HTMLElement) {
          el.style.background='#ff0900'
        },
        created(el, binding, vnode, prevVnode) {
        console.log('directive created',el,binding,vnode)
        },
      })
app.mount('#app')
